package com.study.module.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * @author: 王霄
 * @date: 2021/8/21 22:32
 */
@Component
@Slf4j
public class MyTask {

    @Scheduled(cron = "0 */5 * * * ?")
    public void task() {
        log.info(LocalDateTime.now().toString());
    }
}
